import random
def mysort(liebiao):
    zidian={}
    for i in liebiao:
        zidian[str(i)]=zidian.get(str(i),0)+1
    value=[]
    key=[]
    for i in zidian:
        key.append(int(i))
        value.append(zidian.get(i))
    value=list(set(value))#转为集合再转回列表去重
    value.sort(reverse=True)
    key.sort(reverse=True)
    # print(key)
    # print(zidian)
    # print(value)
    for i in value:
        for j in key:
            if zidian.get(str(j))==i:
                print(str(j)+':'+str(i),end=' ')
                pass

liebiao=[]
for i in range(100):#数据创建
    liebiao.append(random.randint(1,10))
mysort(liebiao)
